↳ Prolog
↳ PrologToPiTRSProof
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
QSORT_IN(.(H, L), S) → U11(H, L, S, split_in(L, H, A, B))
QSORT_IN(.(H, L), S) → SPLIT_IN(L, H, A, B)
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → U71(X, Xs, Y, Ls, Bs, gt_in(X, Y))
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN(X, Y)
GT_IN(s(X), s(Y)) → U101(X, Y, gt_in(X, Y))
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U81(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → U51(X, Xs, Y, Ls, Bs, le_in(X, Y))
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN(X, Y)
LE_IN(s(X), s(Y)) → U111(X, Y, le_in(X, Y))
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U61(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
U11(H, L, S, split_out(L, H, A, B)) → U21(H, L, S, B, qsort_in(A, A1))
U11(H, L, S, split_out(L, H, A, B)) → QSORT_IN(A, A1)
U21(H, L, S, B, qsort_out(A, A1)) → U31(H, L, S, A1, qsort_in(B, B1))
U21(H, L, S, B, qsort_out(A, A1)) → QSORT_IN(B, B1)
U31(H, L, S, A1, qsort_out(B, B1)) → U41(H, L, S, append_in(A1, .(H, B1), S))
U31(H, L, S, A1, qsort_out(B, B1)) → APPEND_IN(A1, .(H, B1), S)
APPEND_IN(.(H, L1), L2, .(H, L3)) → U91(H, L1, L2, L3, append_in(L1, L2, L3))
APPEND_IN(.(H, L1), L2, .(H, L3)) → APPEND_IN(L1, L2, L3)
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
QSORT_IN(.(H, L), S) → U11(H, L, S, split_in(L, H, A, B))
QSORT_IN(.(H, L), S) → SPLIT_IN(L, H, A, B)
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → U71(X, Xs, Y, Ls, Bs, gt_in(X, Y))
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN(X, Y)
GT_IN(s(X), s(Y)) → U101(X, Y, gt_in(X, Y))
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U81(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → U51(X, Xs, Y, Ls, Bs, le_in(X, Y))
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN(X, Y)
LE_IN(s(X), s(Y)) → U111(X, Y, le_in(X, Y))
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U61(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
U11(H, L, S, split_out(L, H, A, B)) → U21(H, L, S, B, qsort_in(A, A1))
U11(H, L, S, split_out(L, H, A, B)) → QSORT_IN(A, A1)
U21(H, L, S, B, qsort_out(A, A1)) → U31(H, L, S, A1, qsort_in(B, B1))
U21(H, L, S, B, qsort_out(A, A1)) → QSORT_IN(B, B1)
U31(H, L, S, A1, qsort_out(B, B1)) → U41(H, L, S, append_in(A1, .(H, B1), S))
U31(H, L, S, A1, qsort_out(B, B1)) → APPEND_IN(A1, .(H, B1), S)
APPEND_IN(.(H, L1), L2, .(H, L3)) → U91(H, L1, L2, L3, append_in(L1, L2, L3))
APPEND_IN(.(H, L1), L2, .(H, L3)) → APPEND_IN(L1, L2, L3)
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
APPEND_IN(.(H, L1), L2, .(H, L3)) → APPEND_IN(L1, L2, L3)
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
APPEND_IN(.(H, L1), L2, .(H, L3)) → APPEND_IN(L1, L2, L3)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
APPEND_IN(.(H, L1), L2) → APPEND_IN(L1, L2)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → U71(X, Xs, Y, Ls, Bs, gt_in(X, Y))
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → U51(X, Xs, Y, Ls, Bs, le_in(X, Y))
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
SPLIT_IN(.(X, Xs), Y, Ls, .(X, Bs)) → U71(X, Xs, Y, Ls, Bs, gt_in(X, Y))
U71(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
U51(X, Xs, Y, Ls, Bs, le_out(X, Y)) → SPLIT_IN(Xs, Y, Ls, Bs)
SPLIT_IN(.(X, Xs), Y, .(X, Ls), Bs) → U51(X, Xs, Y, Ls, Bs, le_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
U51(X, Xs, Y, le_out) → SPLIT_IN(Xs, Y)
U71(X, Xs, Y, gt_out) → SPLIT_IN(Xs, Y)
SPLIT_IN(.(X, Xs), Y) → U71(X, Xs, Y, gt_in(X, Y))
SPLIT_IN(.(X, Xs), Y) → U51(X, Xs, Y, le_in(X, Y))
gt_in(s(X), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(Y)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U10(gt_out) → gt_out
U11(le_out) → le_out
gt_in(x0, x1)
le_in(x0, x1)
U10(x0)
U11(x0)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
U11(H, L, S, split_out(L, H, A, B)) → QSORT_IN(A, A1)
U21(H, L, S, B, qsort_out(A, A1)) → QSORT_IN(B, B1)
QSORT_IN(.(H, L), S) → U11(H, L, S, split_in(L, H, A, B))
U11(H, L, S, split_out(L, H, A, B)) → U21(H, L, S, B, qsort_in(A, A1))
qsort_in(.(H, L), S) → U1(H, L, S, split_in(L, H, A, B))
split_in(.(X, Xs), Y, Ls, .(X, Bs)) → U7(X, Xs, Y, Ls, Bs, gt_in(X, Y))
gt_in(s(X), 0) → gt_out(s(X), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U7(X, Xs, Y, Ls, Bs, gt_out(X, Y)) → U8(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in(.(X, Xs), Y, .(X, Ls), Bs) → U5(X, Xs, Y, Ls, Bs, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(Y)) → le_out(0, s(Y))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U5(X, Xs, Y, Ls, Bs, le_out(X, Y)) → U6(X, Xs, Y, Ls, Bs, split_in(Xs, Y, Ls, Bs))
split_in([], Y, [], []) → split_out([], Y, [], [])
U6(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, .(X, Ls), Bs)
U8(X, Xs, Y, Ls, Bs, split_out(Xs, Y, Ls, Bs)) → split_out(.(X, Xs), Y, Ls, .(X, Bs))
U1(H, L, S, split_out(L, H, A, B)) → U2(H, L, S, B, qsort_in(A, A1))
qsort_in([], []) → qsort_out([], [])
U2(H, L, S, B, qsort_out(A, A1)) → U3(H, L, S, A1, qsort_in(B, B1))
U3(H, L, S, A1, qsort_out(B, B1)) → U4(H, L, S, append_in(A1, .(H, B1), S))
append_in(.(H, L1), L2, .(H, L3)) → U9(H, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U9(H, L1, L2, L3, append_out(L1, L2, L3)) → append_out(.(H, L1), L2, .(H, L3))
U4(H, L, S, append_out(A1, .(H, B1), S)) → qsort_out(.(H, L), S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
U21(H, B, qsort_out(A1)) → QSORT_IN(B)
QSORT_IN(.(H, L)) → U11(H, split_in(L, H))
U11(H, split_out(A, B)) → QSORT_IN(A)
U11(H, split_out(A, B)) → U21(H, B, qsort_in(A))
qsort_in(.(H, L)) → U1(H, split_in(L, H))
split_in(.(X, Xs), Y) → U7(X, Xs, Y, gt_in(X, Y))
gt_in(s(X), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U7(X, Xs, Y, gt_out) → U8(X, split_in(Xs, Y))
split_in(.(X, Xs), Y) → U5(X, Xs, Y, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(Y)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U5(X, Xs, Y, le_out) → U6(X, split_in(Xs, Y))
split_in([], Y) → split_out([], [])
U6(X, split_out(Ls, Bs)) → split_out(.(X, Ls), Bs)
U8(X, split_out(Ls, Bs)) → split_out(Ls, .(X, Bs))
U1(H, split_out(A, B)) → U2(H, B, qsort_in(A))
qsort_in([]) → qsort_out([])
U2(H, B, qsort_out(A1)) → U3(H, A1, qsort_in(B))
U3(H, A1, qsort_out(B1)) → U4(append_in(A1, .(H, B1)))
append_in(.(H, L1), L2) → U9(H, append_in(L1, L2))
append_in([], L) → append_out(L)
U9(H, append_out(L3)) → append_out(.(H, L3))
U4(append_out(S)) → qsort_out(S)
qsort_in(x0)
split_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U7(x0, x1, x2, x3)
le_in(x0, x1)
U11(x0)
U5(x0, x1, x2, x3)
U6(x0, x1)
U8(x0, x1)
U1(x0, x1)
U2(x0, x1, x2)
U3(x0, x1, x2)
append_in(x0, x1)
U9(x0, x1)
U4(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
QSORT_IN(.(H, L)) → U11(H, split_in(L, H))
Used ordering: Polynomial interpretation [25]:
U21(H, B, qsort_out(A1)) → QSORT_IN(B)
U11(H, split_out(A, B)) → QSORT_IN(A)
U11(H, split_out(A, B)) → U21(H, B, qsort_in(A))
POL(.(x1, x2)) = 1 + x2
POL(0) = 0
POL(QSORT_IN(x1)) = 1 + x1
POL(U1(x1, x2)) = 0
POL(U10(x1)) = 0
POL(U11(x1)) = 0
POL(U11(x1, x2)) = 1 + x2
POL(U2(x1, x2, x3)) = 0
POL(U21(x1, x2, x3)) = 1 + x2
POL(U3(x1, x2, x3)) = 0
POL(U4(x1)) = 0
POL(U5(x1, x2, x3, x4)) = 1 + x2
POL(U6(x1, x2)) = 1 + x2
POL(U7(x1, x2, x3, x4)) = 1 + x2
POL(U8(x1, x2)) = 1 + x2
POL(U9(x1, x2)) = 0
POL([]) = 0
POL(append_in(x1, x2)) = 0
POL(append_out(x1)) = 0
POL(gt_in(x1, x2)) = 0
POL(gt_out) = 0
POL(le_in(x1, x2)) = 0
POL(le_out) = 0
POL(qsort_in(x1)) = 0
POL(qsort_out(x1)) = 0
POL(s(x1)) = 0
POL(split_in(x1, x2)) = x1
POL(split_out(x1, x2)) = x1 + x2
U6(X, split_out(Ls, Bs)) → split_out(.(X, Ls), Bs)
split_in([], Y) → split_out([], [])
split_in(.(X, Xs), Y) → U7(X, Xs, Y, gt_in(X, Y))
U5(X, Xs, Y, le_out) → U6(X, split_in(Xs, Y))
U7(X, Xs, Y, gt_out) → U8(X, split_in(Xs, Y))
U8(X, split_out(Ls, Bs)) → split_out(Ls, .(X, Bs))
split_in(.(X, Xs), Y) → U5(X, Xs, Y, le_in(X, Y))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
U21(H, B, qsort_out(A1)) → QSORT_IN(B)
U11(H, split_out(A, B)) → QSORT_IN(A)
U11(H, split_out(A, B)) → U21(H, B, qsort_in(A))
qsort_in(.(H, L)) → U1(H, split_in(L, H))
split_in(.(X, Xs), Y) → U7(X, Xs, Y, gt_in(X, Y))
gt_in(s(X), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U7(X, Xs, Y, gt_out) → U8(X, split_in(Xs, Y))
split_in(.(X, Xs), Y) → U5(X, Xs, Y, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(Y)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U5(X, Xs, Y, le_out) → U6(X, split_in(Xs, Y))
split_in([], Y) → split_out([], [])
U6(X, split_out(Ls, Bs)) → split_out(.(X, Ls), Bs)
U8(X, split_out(Ls, Bs)) → split_out(Ls, .(X, Bs))
U1(H, split_out(A, B)) → U2(H, B, qsort_in(A))
qsort_in([]) → qsort_out([])
U2(H, B, qsort_out(A1)) → U3(H, A1, qsort_in(B))
U3(H, A1, qsort_out(B1)) → U4(append_in(A1, .(H, B1)))
append_in(.(H, L1), L2) → U9(H, append_in(L1, L2))
append_in([], L) → append_out(L)
U9(H, append_out(L3)) → append_out(.(H, L3))
U4(append_out(S)) → qsort_out(S)
qsort_in(x0)
split_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U7(x0, x1, x2, x3)
le_in(x0, x1)
U11(x0)
U5(x0, x1, x2, x3)
U6(x0, x1)
U8(x0, x1)
U1(x0, x1)
U2(x0, x1, x2)
U3(x0, x1, x2)
append_in(x0, x1)
U9(x0, x1)
U4(x0)